home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-16 | 2.5 KB | 86 lines | [TEXT/ttxt] |
- OpenDocâ„¢ Utilities Documentation
-
- Editor Set Utilities
- by The OpenDoc Design Team
-
- © 1993-1996 Apple Computer, Inc. All Rights Reserved.
- Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
- Mac and OpenDoc are trademarks of Apple Computer, Inc.
-
-
- Introduction
-
- The Editor Set Utilities provide a C++ collection and iterator for storing ODEditors.
-
-
- EditorSet
-
- The EditorSet class implements a collection of ODEditors. It is implemented using OrderedCollection, documented
- elsewhere in this folder.
-
- Constructors and Destructors
-
- EditorSet();
- // Constructs an empty EditorSet
-
- ~EditorSet();
- // Destructs the collection, deleting the links, but not the ODEditors themselves.
-
-
- Initialization
-
- void InitEditorSet();
- // Allocates a new OrderedCollection to hold the ODEditors. You can use this method (with RemoveAllEditors)
- to resuse existing EditorSets where it's inconvenient to create them from scratch each time.
-
- Adding and removing elements
-
- void AddEditor(ODEditor editor);
- // Adds an editor to the collection.
-
- void AddEditorSet(EditorSet* editors);
- // Adds one set to another, producing a union of the two (no duplicates).
-
- void RemoveEditor(ODEditor editor);
- // Removes the specified editor from the collection.
-
- void RemoveEditor(EditorSet* editors);
- // Removes all editors in the set passed in. This method should probably be named
- RemoveEditorSet. Note that if you call AddEditorSet and then RemoveEditorSet with the same
- parameter you will be left with a smaller collection than you began with if the two sets
- had any editors in common before the call to AddEditorSet.
-
- void RemoveAllEditors();
- // Removes all editors, leaving the EditorSet empty but ready to accept additions.
-
- Accessing elements
-
- ODBoolean ContainsEditor(ODEditor editor);
- // Returns true if the editor is in the EditorSet.
-
- ODULong GetEditorCount();
- // Returns the number of editors in the EditorSet.
-
- EditorSetIterator* CreateIterator();
- // Returns a new EditorSetIterator that can be used to iterate over the EditorSet.
-
- EditorSetIterator
-
- This class iterates over an EditorSet. It is imlemented using OrderedCollectionIterator.
-
- EditorSetIterator(EditorSet* set);
- // Constructor
-
- ~EditorSetIterator();
- // Destructor
-
- ODEditor First();
- // Returns (duh) the first editor.
-
- ODEditor Next();
- // Returns the next editor (i.e. the first among those not yet visited).
-
- ODBoolean IsNotComplete();
- // returns true if there remain editors not yet retreived with Next() or First().
-
-